package com.lsc.www.day04;

public class MethodTest02 {
//    static int a = 100;
    public static void main(String[] args) {
        String str = search(90);
        System.out.println(str);
        test(9 , 8);
        double d = test1();
        System.out.println(d);
        test2();

    }


    //有参有返回值
    public static String search(double num){
//        if(num >100 || num <0){
            //return他直接就跳出该方法了
//            return "输入有误";
            //idea 判断到这句话不可能被执行到所以报错
//            System.out.println("1223");
//        }
        if(num>=90){
            return "A";
        }else if(num >= 80){
            return "B";
        }else {
            return "E";
        }

    }

    //有参无返回值
    public static void test(int a , int b){

        System.out.println(a+b);
    }

    //无参有返回值
    public static double test1(){
        return 100.05;
    }

    // 无参无返回值
    public static void test2(){
        System.out.println("Hello");
    }


}
